<template>
  <div class="qywxCode">
    <c-title :hide="false" text="企微码"></c-title>
    <img :src="codeUrl" alt="">
    <div class="txt">企业微信二维码</div>
  </div>
</template>
<script>
export default {
  data(){
    return{
      codeUrl:""
    }
  },
  activated(){
    this.getData();
  },
  methods:{
    async getData(){
      let { data, msg, result } = await $http.post("plugin.gas-station.frontend.controllers.staff-code", { store_id: this.$route.params.store_id }, "");
      if(result){
        this.codeUrl = data;
      }else{
        this.$toast(msg);
      }
    }
  }
}
</script>
<style lang="scss" scoped>
.qywxCode{
  padding: 1rem;
  img{
    width:100%;
    height: auto;
  }
  .txt{
    text-align: center;
  }
}
</style>